package com.example.wheelguide;


import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;



public class MainActivity extends Activity {


	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		Intent i = new Intent();
		Database db = new Database(this);
		
		if(db.checkProfil())
		{
			Bundle b= new Bundle();
			b.putSerializable("database", db);
			i.setClass(getApplicationContext(), MainMenuActivity.class);
		}
		else
		{
			Bundle b= new Bundle();
			b.putSerializable("database", db);
			i.setClass(this, FirstStepActivity.class);
		}
				
		
			startActivity(i);
			finish();
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_main, menu);
		
		return true;
	}
	

}

	
